<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
	<title>库存查询管理</title>
	<meta http-equiv="Content-type" content="text/html; charset=utf-8">
	<meta name="decorator" content="ani"/>
	<%@ include file="/webpage/include/bootstraptable.jsp"%>
	<%@include file="/webpage/include/treeview.jsp" %>
	<%@include file="inventoryList.js" %>
	<style>
		#searchresult
		{
			width: 260px;
			position: absolute;
			z-index: 1;
			overflow: hidden;
			left: 140px;
			top: 71px;
			background: #E0E0E0;
			border-top: none;

		}

		.line
		{
			font-size: 15px;
			background: #E0E0E0;
			width: 140px;
			padding:0px;
		}
		.hover
		{
			background: #007ab8;
			width: 140px;
			color: #fff;
		}
		.std
		{
			width: 150px;
		}
	</style>
</head>
<body>
	<div class="wrapper wrapper-content">
	<div class="panel panel-primary">
	<div class="panel-heading">
		<h3 class="panel-title">库存查询列表</h3>
	</div>
	<div class="panel-body">
		<sys:message content="${message}"/>
	
	<!-- 搜索 -->
	<div class="accordion-group">
	<div id="collapseTwo" class="accordion-body collapse">
		<div class="accordion-inner">
			<form:form id="searchForm" modelAttribute="inventory" class="form form-horizontal well clearfix">
				<div class="col-xs-12 col-sm-6 col-md-4">
					<label class="label-item single-overflow pull-left" title="货位：">货位：</label>
					<sys:gridselect url="${ctx}/infor/location/data" id="location" name="location.id" value="${inventory.location.id}" labelName="location.name" labelValue="${inventory.location.name}"
									title="选择货位" cssClass="form-control required" fieldLabels="名称" fieldKeys="name" searchLabels="名称" searchKeys="name" ></sys:gridselect>
				</div>
				<div class="col-xs-12 col-sm-6 col-md-4">
					<label class="label-item single-overflow pull-left" title="物料编码：">物料编码：</label>
					<form:input path="code" htmlEscape="false" maxlength="64"  class=" form-control"/>
				</div>
				<div class="col-xs-12 col-sm-6 col-md-4">
					<label class="label-item single-overflow pull-left" title="物料名称：">物料名称：</label>
					<sys:gridselect url="${ctx}/infor/goods/data" id="goods" name="name.id" value="${inventory.name.id}" labelName="name.name" labelValue="${inventory.name.name}"
									title="选择物料" cssClass="form-control required" fieldLabels="名称" fieldKeys="name" searchLabels="名称" searchKeys="name" ></sys:gridselect>
				</div><shiro:hasPermission name="wms:inventory:pro">
				<div class="col-xs-12 col-sm-6 col-md-4">
					<label class="label-item single-overflow pull-left" title="：">项目：</label>
					<select name="projectName" class=" form-control">
						<option value="">请选择</option>
						<option value="武汉润滑油仓储项目">武汉润滑油仓储项目</option>
						<option value="北京润滑油运输项目">北京润滑油运输项目</option>
						<option value="天津润滑油运输项目">天津润滑油运输项目</option>
						<option value="西安润滑油仓储配送项目">西安润滑油仓储配送项目</option>
						<option value="郑州润滑油运输项目">郑州润滑油运输项目</option>
						<option value="重庆润滑油仓储配送项目">重庆润滑油仓储配送项目	</option>

						<option value="石家庄润滑油仓储配送项目">石家庄润滑油仓储配送项目</option>
					</select>
				</div></shiro:hasPermission>
		 <div class="col-xs-12 col-sm-6 col-md-4">
			<div style="margin-top:26px">
			  <a  id="search" class="btn btn-primary btn-rounded  btn-bordered btn-sm"><i class="fa fa-search"></i> 查询</a>
			  <a  id="reset" class="btn btn-primary btn-rounded  btn-bordered btn-sm" ><i class="fa fa-refresh"></i> 重置</a>
			 </div>
	    </div>	
	</form:form>
	</div>
	</div>
	</div>
	
	<!-- 工具栏 -->
	<div id="toolbar">

	        	<a class="accordion-toggle btn btn-default" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo">
					<i class="fa fa-search"></i> 检索
				</a>
		    </div>
		
	<!-- 表格 -->
	<table id="inventoryTable" class="table text-nowrap"  data-toolbar="#toolbar"></table>

    <!-- context menu -->

	</div>
	</div>
	</div>
	<input type="hidden" id="inventId"/>
	<input type="hidden" id="inventId1"/>
	<input type="hidden" id="inventId2"/>
	<input type="hidden" id="inventId3"/>

	<div class="modal fade" id="yd" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="myModalLabel">库存移动</h4>
				</div>
				<div class="modal-body">
					<table class="table table-bordered">
						<tr><td>物料编码</td>
							<td><input class="form-control" type="text" readonly="readonly" id="code0"/></td></tr>
						<tr><td>物料名称</td>
							<td><input class="form-control" type="text" readonly="readonly" id="name0"/></td></tr>
						<tr><td>原货位</td>
							<td><input class="form-control" type="text" readonly="readonly" id="location"/></td></tr>
						<tr><td>入库日期</td>
							<td><input class="form-control" type="text" readonly="readonly" id="entry"/></td></tr>
						<tr><td>批次</td>
							<td><input type="text" class="form-control" readonly="readonly" id="batch0"/></td></tr>
						<tr><td>可用量</td>
							<td><input type="text" class="form-control" readonly="readonly" id="amount"/></td></tr>
						<tr><td>至货位</td>
							<td><input class="form-control" type="text" onkeyup="se(event)"  id="newLocation1"/>
								<input class="form-control" type="hidden"   id="newLocation"/>
								<div id="searchresult" style="display: none;"></div></td></tr>

						<tr><td>移动数量</td><td><input type="text" class="form-control"  id="moveAmount"/></td></tr>
					</table>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
					<button type="button" class="btn btn-primary" onclick="yd()">保存</button>
				</div>
			</div><!-- /.modal-content -->
		</div><!-- /.modal -->
	</div>
	<div class="modal fade" id="ed" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="mModalLabel">库存调整</h4>
				</div>
				<div class="modal-body">
					<table class="table table-bordered">
						<tr><td>物料编码</td>
							<td><input class="form-control" type="text" readonly="readonly" id="code1"/></td></tr>
						<tr><td>物料名称</td>
							<td><input class="form-control" type="text" readonly="readonly" id="name1"/></td></tr>
						<tr><td>货位</td>
							<td><input class="form-control" type="text" readonly="readonly" id="location1"/></td></tr>
						<tr><td>入库日期</td>
							<td><input class="form-control" type="text" readonly="readonly" id="entry1"/></td></tr>
						<tr><td>批次</td>
							<td><input type="text" class="form-control" readonly="readonly" id="batch1"/></td></tr>
						<tr><td>可用量</td>
							<td><input type="text" class="form-control" readonly="readonly" id="amount1"/></td></tr>

						<tr><td>调整数量</td><td><input type="text" class="form-control number"  id="moveAmount1"/></td></tr>
					</table>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
					<button type="button" class="btn btn-primary" onclick="up()">保存</button>
				</div>
			</div><!-- /.modal-content -->
		</div><!-- /.modal -->
	</div>
	<div class="modal fade" id="sd" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="myModalLabe2">库存锁定</h4>
				</div>
				<div class="modal-body">
					<table class="table table-bordered">
						<tr><td>物料编码</td>
							<td><input class="form-control" type="text" readonly="readonly" id="code2"/></td></tr>
						<tr><td>物料名称</td>
							<td><input class="form-control" type="text" readonly="readonly" id="name2"/></td></tr>
						<tr><td>货位</td>
							<td><input class="form-control" type="text" readonly="readonly" id="location2"/></td></tr>
						<tr><td>入库日期</td>
							<td><input class="form-control" type="text" readonly="readonly" id="entry2"/></td></tr>
						<tr><td>批次</td>
							<td><input type="text" class="form-control" readonly="readonly" id="batch2"/></td></tr>

						<tr><td>可用量</td>
							<td><input type="text" class="form-control" readonly="readonly" id="amount2"/></td></tr>
						<tr><td>锁定数量</td><td><input type="text" class="form-control required "  id="sdAmount"/></td></tr>
					</table>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
					<button type="button" class="btn btn-primary" onclick="sd()">保存</button>
				</div>
			</div><!-- /.modal-content -->
		</div><!-- /.modal -->
	</div>
	<div class="modal fade" id="qx" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="myModalLabe3">取消锁定</h4>
				</div>
				<div class="modal-body">
					<table class="table table-bordered">
						<tr><td>物料编码</td>
							<td><input class="form-control" type="text" readonly="readonly" id="code3"/></td></tr>
						<tr><td>物料名称</td>
							<td><input class="form-control" type="text" readonly="readonly" id="name3"/></td></tr>
						<tr><td>货位</td>
							<td><input class="form-control" type="text" readonly="readonly" id="location3"/></td></tr>
						<tr><td>入库日期</td>
							<td><input class="form-control" type="text" readonly="readonly" id="entry3"/></td></tr>
						<tr><td>批次</td>
							<td><input type="text" class="form-control" readonly="readonly" id="batch3"/></td></tr>

						<tr><td>锁定数量</td>
							<td><input type="text" class="form-control" readonly="readonly" id="amount3"/></td></tr>
						<tr><td>取消数量</td><td><input type="text" class="form-control required "  id="qxAmount"/></td></tr>
					</table>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
					<button type="button" class="btn btn-primary" onclick="qx()">保存</button>
				</div>
			</div><!-- /.modal-content -->
		</div><!-- /.modal -->
	</div>

</body>

</html>